home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-03 / qbnws102.zip / GRAPHSPK.ZIP / SCR2BITS.BAS < prev    next >
BASIC Source File  |  1989-12-28  |  2KB  |  49 lines

  1. '======================= SCR2BITS.BAS ==================================
  2. '                       Quick Basic 4.5
  3. '             Copyright 1989 - Frederick Volking
  4. ' All Rights released to public domain by original author on 12/01/89
  5. '
  6. ' =====================================================================
  7. '
  8. ' This program displays the bit-map for a 16x16 pixel image stored
  9. ' with the graphics GET image command for Screen 2 - CGA monochrome.
  10. '
  11. ' This program requires the function BITON.BAS be merged with it.
  12. '
  13. ' ==================================================================
  14. '  Author:       Frederick Volking
  15. '  Contact:      (415)952-3450 [home]          (415)378-4640 [work]
  16. '  USPO Mail:    425 Larch Avenue  -  South San Francisco, CA 94080
  17. '  EchoMail:     ANY Basic conference (I try to read them all)
  18. '  Library At:   QBCentral BBS - Vancouver Washington (206)892-7500
  19. ' ==================================================================
  20. DEFINT A-Z
  21. CLS
  22. SCREEN 2
  23. IntsNeeded = 18
  24. DIM A(1 TO IntsNeeded)
  25. CLS
  26. LINE (0, 0)-(15, 15), 1, B
  27. LINE (0, 0)-(15, 15), 1
  28. GET (0, 0)-(15, 15), A
  29. LOCATE 1, 10: PRINT "Integers Used   = "; IntsNeeded
  30. LOCATE 2, 10: PRINT "Array Element 1 = "; A(1)
  31. LOCATE 3, 10: PRINT "Array Element 2 = "; A(2)
  32. LOCATE 4, 10: PRINT "Color = "; Clr
  33. PRINT
  34.  
  35. FOR C = 3 TO IntsNeeded
  36.    FOR Bit = 1 TO 8
  37.       IF (BitOn(Bit, A(C))) THEN PRINT "1";  ELSE PRINT "0";
  38.    NEXT
  39.    PRINT " ";
  40.    FOR Bit = 9 TO 16
  41.       IF (BitOn(Bit, A(C))) THEN PRINT "1";  ELSE PRINT "0";
  42.    NEXT
  43.    PRINT "  ";
  44. NEXT
  45.  
  46. WHILE INKEY$ = "" : WEND
  47. SCREEN 0
  48. CLS
  49. END